package com.boomsecret.juc.collections;

import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @author wangjinliang on 2019/1/22.
 */
public class CopyOnWriteArraySetDemo {
    public static void main(String[] args) {
        CopyOnWriteArraySet<String> copyOnWriteArraySet = new CopyOnWriteArraySet<>();
        copyOnWriteArraySet.add("cc");
        copyOnWriteArraySet.add("dd");
        copyOnWriteArraySet.add("aa");
        copyOnWriteArraySet.add("bb");

        for (String value : copyOnWriteArraySet) {
            System.out.println(value);
        }
    }
}
